package com.leeon.thread;

public class YiedRunnable implements Runnable {

	public  YiedRunnable() {
		System.out.println("YiedRunnable Contructor");
	}
	
	@Override
	public void run() {
		System.out.println("#current thread id " + Thread.currentThread().getId());
		Thread.yield();
		Thread.yield();
		Thread.yield();
	}

	public static void main(String[] args) {
		for(int i = 0; i < 100; i++) {
			new Thread(new YiedRunnable()).start();
		}
		System.out.println("wait for threads");
	}
}
